{% extends 'base/base.html' %}

{% block title %}
    <title>用户登录</title>
{% endblock %}

{% block body %}
    <div class="row container justify-content-center mt-5">
        {% for cat,msg in get_flashed_messages(with_categories=True) %}
            <div class="col-6 alert alert-{{ cat }}">{{ msg }}</div>
        {% endfor %}
    </div>
    <div class="row container justify-content-center mt-5">
        <form class="col-6" action="{{ url_for('accounts.login') }}" method="post">
            {{ form.csrf_token }}
            <div class="mb-3 row">
                {{ form.username.label }}
                {{ form.username }}
            </div>
            <div class="mb-3 row">
                {{ form.password.label }}
                {{ form.password }}
            </div>
            <button class="btn btn-primary" type="submit">登录</button>
        </form>
    </div>
{% endblock %}